import { createContext } from 'react';

/** 定义上下文 */
export interface IWorkflowCheckRecordContext {
  prefixCls: string;
  requestController: string;
  reloadPageCallback: () => void;
  dataDetailInfo: Record<string, any>;
  flowBusinessType: string;
  revokeStateID: string;
  curRes: Record<string, any>;
  allOpenNodeBody: boolean;
  isCheckDrawer: boolean;
}

/** 初始化上下文  */
const init_workflowCheckRecord_context: IWorkflowCheckRecordContext = {
  prefixCls: 'workflow-checkresroot-',
  requestController: '',
  reloadPageCallback: () => {},
  dataDetailInfo: {},
  flowBusinessType: '',
  revokeStateID: '',
  curRes: {},
  allOpenNodeBody: false,
  isCheckDrawer: false,
};

/** 创建上下文  */
const WorkflowCheckRecordContext = createContext(init_workflowCheckRecord_context);

/**
 * 导出上下文
 */
export { WorkflowCheckRecordContext };
